<?php
declare (strict_types=1);

namespace app\admin\validates;

use think\Validate;

/**
 * ScanBag验证器
 */
class ScanBagStrategyValidate extends Validate
{
    /**
     * 验证规则
     * @var array
     */
    protected $rule = [
        'id' => 'require|number',
        'key' => 'require|max:255|unique:scan_bag_strategy',
        'name' => 'require|max:255|unique:scan_bag_strategy',
        'type' => 'require|number',
        'first' => 'require|number',
        'second' => 'require|number',
        'third' => 'require|number',
        'remark' => 'require|max:255',
    ];

    /**
     * 验证场景
     * @var array
     */
    protected $scene = [
        'edit' => ['id', 'key', 'name', 'type', 'first', 'second','third','remark'],
        'add' => ['key', 'name', 'type', 'first', 'second','third','remark'],
    ];


}